﻿package com.toncen.samepms.system.dao;

import java.sql.SQLException;
import java.util.List;

import com.toncen.samepms.common.AbstractDao;
import com.toncen.samepms.system.domain.LoginLog;

/**
 * 描述：登录日志表SYSTEM_LOGIN_LOG的dao文件
 * 
 * @author zq
 */
public class LoginLogDao extends AbstractDao<LoginLog> {

	public LoginLogDao() {
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.comit.common.db.BaseDao#initialize()
	 */
	@Override
	protected void initialize() {
		setStatementPrefix("LoginLog");
		setStatementDivision(".");
	}

	/**
	 * 
	 * TODO 是否第一次登录
	 * 
	 * @author Oct 12, 2012 9:57:26 AM ZQ
	 * @param account
	 * @return
	 * @throws SQLException
	 * 
	 */
	public List<LoginLog> isFirstLogin(String account) throws SQLException {

		return getSqlMap().queryForList(getStatement("getByAccount"), account);
	}
}
